package com.felix.service.impl;

import com.felix.api.dubbo.service.DeptDubboService;
import com.felix.api.dubbo.service.EmpDubboService;
import com.felix.pojo.Dept;
import com.felix.pojo.Emp;
import com.felix.service.DeptService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @program: dubboDemoParent
 * @ClassName DeptServiceImpl
 * @description:
 * @author: yaoguipei
 * @create: 2022-01-20 13:16
 * @Version 1.0
 **/
@Service
public class DeptServiceImpl implements DeptService {

    @Reference
    private DeptDubboService deptDubboService;
    @Reference
    private EmpDubboService empDubboService ;

    @Override
    public List<Dept> findAll() {
        return deptDubboService.findAllDept();
    }

    @Override
    public List<Emp> findEmpByDeptId(Integer did) {
        return empDubboService.findEmpByDeptId(did);
    }
}
